home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / src / fig09_07.jar / Ch09 / Fig09_07 / Point2.cpp < prev    next >
C/C++ Source or Header  |  1997-10-26  |  439b  |  23 lines

  1. // Fig. 9.7: point2.cpp
  2. // Member function definitions for class Point
  3. #include <iostream.h>
  4. #include "point2.h"
  5.  
  6. // Constructor for class Point
  7. Point::Point( int a, int b )
  8. {
  9.    x = a;
  10.    y = b;
  11.  
  12.    cout << "Point  constructor: "
  13.         << '[' << x << ", " << y << ']' << endl;
  14. }
  15.  
  16. // Destructor for class Point
  17. Point::~Point()
  18. {
  19.    cout << "Point  destructor:  "
  20.         << '[' << x << ", " << y << ']' << endl;
  21. }
  22.  
  23.